package conf

import (
	"fmt"
	"github.com/spf13/viper"
)

type ConfigViper struct {
	Mysql struct {
		Dialect string
		Dsa     string
	}
	Redis struct {
		Addr     string
		Password string
		DB       int
	}
}

var ConfigData ConfigViper

func ViperConfig() {
	viper.SetConfigFile("conf/config.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&ConfigData)
	fmt.Println(ConfigData)
}
